package com.woody.aggregate.repository.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woody.aggregate.domain.contract.ContractRecord;
import com.woody.aggregate.infrastructure.contract.entity.ContractRecordEntity;
import com.woody.aggregate.infrastructure.contract.mapper.ContractRecordMapper;
import com.woody.aggregate.repository.ContractRecordRepository;
import com.woody.common.web.util.JacksonUtil;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author hzy
 * @date 2025/3/18 上午10:18
 */
@Repository
public class ContractRecordRepositoryImpl extends ServiceImpl<ContractRecordMapper, ContractRecordEntity> implements ContractRecordRepository {


    @Override
    public void batchSaveModel(List<ContractRecord> list) {
        List<ContractRecordEntity> entityList = JacksonUtil.reGroupArray(list, ContractRecordEntity[].class);
        saveBatch(entityList);
    }
}
